package com.qf.mapper;

import com.qf.model.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;
@Mapper
public interface SysUserMapper {

    public int add(SysUser user);

    public SysUser findById(@Param("id") int id);

    public int edit(SysUser user);

    public int delete(@Param("id") int id);

    //当前页结果
    public List<SysUser> findPage(@Param("currentPage")Integer currentPage, @Param("pageSize")Integer pageSize, @Param("queryString")String queryString,@Param("userId")Integer userId);


    //总记录数
    public Long count(String queryString,@Param("userId")Integer userId);

    public List<SysUser> findAll();


    @Select("Select * from sys_user where username=#{username}")
    SysUser findUserByUsername(String username);

}
